import socket SERVER_IP = 'www.48v.me' # This should be the IP of the server, use 127.0.0.1 for local testing SERVER_PORT = "任意のポート番号" # Server port number def main(): client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect((SERVER_IP, SERVER_PORT)) client.sendall(b'Hello, Server!') response = client.recv(1024) print(f"Received: {response.decode()}") client.close() if __name__ == "__main__": main()